<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FreeRTOS Addons: cpp_freertos::CriticalSection Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FreeRTOS Addons
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecpp__freertos.html">cpp_freertos</a></li><li class="navelem"><a class="el" href="classcpp__freertos_1_1_critical_section.html">CriticalSection</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classcpp__freertos_1_1_critical_section-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">cpp_freertos::CriticalSection Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="critical_8hpp_source.html">critical.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a6648fd37c8556b2a8e958011f4614817"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#a6648fd37c8556b2a8e958011f4614817">DisableInterrupts</a> ()</td></tr>
<tr class="separator:a6648fd37c8556b2a8e958011f4614817"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5052d7f1847b41cc503076be983ff96"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#ad5052d7f1847b41cc503076be983ff96">EnableInterrupts</a> ()</td></tr>
<tr class="separator:ad5052d7f1847b41cc503076be983ff96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac31be583c6674aea582d4fa831e4e3fb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#ac31be583c6674aea582d4fa831e4e3fb">Enter</a> ()</td></tr>
<tr class="separator:ac31be583c6674aea582d4fa831e4e3fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab78166fa2e3130eb0285b9ff88bc090a"><td class="memItemLeft" align="right" valign="top">static BaseType_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#ab78166fa2e3130eb0285b9ff88bc090a">EnterFromISR</a> ()</td></tr>
<tr class="separator:ab78166fa2e3130eb0285b9ff88bc090a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f7e9a6a562669d8554658e5e974302a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#a5f7e9a6a562669d8554658e5e974302a">Exit</a> ()</td></tr>
<tr class="separator:a5f7e9a6a562669d8554658e5e974302a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3b454d554d41da00bb23c8c32a4b21a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#ab3b454d554d41da00bb23c8c32a4b21a">ExitFromISR</a> (BaseType_t savedInterruptStatus)</td></tr>
<tr class="separator:ab3b454d554d41da00bb23c8c32a4b21a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33568ab0478ad5fb4e7438af8e25a40d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#a33568ab0478ad5fb4e7438af8e25a40d">ResumeScheduler</a> ()</td></tr>
<tr class="separator:a33568ab0478ad5fb4e7438af8e25a40d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27aa6c4e9bf5bbe3da7222030392783c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcpp__freertos_1_1_critical_section.html#a27aa6c4e9bf5bbe3da7222030392783c">SuspendScheduler</a> ()</td></tr>
<tr class="separator:a27aa6c4e9bf5bbe3da7222030392783c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Wrapper class around various critical section type synchronization mechanisms within FreeRTOS. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a6648fd37c8556b2a8e958011f4614817" name="a6648fd37c8556b2a8e958011f4614817"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6648fd37c8556b2a8e958011f4614817">&#9670;&#160;</a></span>DisableInterrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::DisableInterrupts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Disable all maskable interrupts. </p>

</div>
</div>
<a id="ad5052d7f1847b41cc503076be983ff96" name="ad5052d7f1847b41cc503076be983ff96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5052d7f1847b41cc503076be983ff96">&#9670;&#160;</a></span>EnableInterrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::EnableInterrupts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Enable all maskable interrupts. </p>

</div>
</div>
<a id="ac31be583c6674aea582d4fa831e4e3fb" name="ac31be583c6674aea582d4fa831e4e3fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac31be583c6674aea582d4fa831e4e3fb">&#9670;&#160;</a></span>Enter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::Enter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Disable context switches as well as maskable interrupts. </p>

</div>
</div>
<a id="ab78166fa2e3130eb0285b9ff88bc090a" name="ab78166fa2e3130eb0285b9ff88bc090a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab78166fa2e3130eb0285b9ff88bc090a">&#9670;&#160;</a></span>EnterFromISR()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static BaseType_t cpp_freertos::CriticalSection::EnterFromISR </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Disable context switches as well as maskable interrupts from an interrupt context.</p>
<dl class="section return"><dt>Returns</dt><dd>Opaque representation of interrupt mask state. This must be passed back to the corresponding call to <a class="el" href="classcpp__freertos_1_1_critical_section.html#ab3b454d554d41da00bb23c8c32a4b21a">ExitFromISR()</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>See the following for further details: <a href="http://www.freertos.org/taskENTER_CRITICAL_FROM_ISR_taskEXIT_CRITICAL_FROM_ISR.html">http://www.freertos.org/taskENTER_CRITICAL_FROM_ISR_taskEXIT_CRITICAL_FROM_ISR.html</a> </dd></dl>

</div>
</div>
<a id="a5f7e9a6a562669d8554658e5e974302a" name="a5f7e9a6a562669d8554658e5e974302a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f7e9a6a562669d8554658e5e974302a">&#9670;&#160;</a></span>Exit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::Exit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Re-enable context switches. </p>

</div>
</div>
<a id="ab3b454d554d41da00bb23c8c32a4b21a" name="ab3b454d554d41da00bb23c8c32a4b21a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3b454d554d41da00bb23c8c32a4b21a">&#9670;&#160;</a></span>ExitFromISR()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::ExitFromISR </td>
          <td>(</td>
          <td class="paramtype">BaseType_t&#160;</td>
          <td class="paramname"><em>savedInterruptStatus</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Re-enable context switches from an interrupt context.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">savedInterruptStatus</td><td>This should be the value you received from calling <a class="el" href="classcpp__freertos_1_1_critical_section.html#ab78166fa2e3130eb0285b9ff88bc090a">EnterFromISR()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>See the following for further details: <a href="http://www.freertos.org/taskENTER_CRITICAL_FROM_ISR_taskEXIT_CRITICAL_FROM_ISR.html">http://www.freertos.org/taskENTER_CRITICAL_FROM_ISR_taskEXIT_CRITICAL_FROM_ISR.html</a> </dd></dl>

</div>
</div>
<a id="a33568ab0478ad5fb4e7438af8e25a40d" name="a33568ab0478ad5fb4e7438af8e25a40d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33568ab0478ad5fb4e7438af8e25a40d">&#9670;&#160;</a></span>ResumeScheduler()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::ResumeScheduler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Re-enable the scheduler. </p>

</div>
</div>
<a id="a27aa6c4e9bf5bbe3da7222030392783c" name="a27aa6c4e9bf5bbe3da7222030392783c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27aa6c4e9bf5bbe3da7222030392783c">&#9670;&#160;</a></span>SuspendScheduler()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cpp_freertos::CriticalSection::SuspendScheduler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p >Suspend the scheduler without disabling interrupts. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/<a class="el" href="critical_8hpp_source.html">critical.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
